<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/renshi.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/renshi.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'reshi_id',
                footer: "Foots",
                cnName: '人事表',
                name: 'jrtable/renshi',
                url: "/renshi/",
                sortName: "reshi_id"
            });
            const editFormFields = ref({"name":"","address":"","sex":"","xuel":"","xuex":"","zuany":"","engdj":"","gkqk":"","phone":"","ypfx":[],"sffc":"","other":"","selfpj":"","source":[]});
            const editFormOptions = ref([[{"title":"姓名","required":true,"field":"name"},
                               {"title":"地址","required":true,"field":"address"}],
                              [{"dataKey":"sex","data":[],"title":"性别","required":true,"field":"sex","type":"select"},
                               {"title":"学历","required":true,"field":"xuel"}],
                              [{"title":"学校","required":true,"field":"xuex"},
                               {"title":"专业","required":true,"field":"zuany"}],
                              [{"title":"英语等级","required":true,"field":"engdj"},
                               {"title":"挂科情况","required":true,"field":"gkqk","type":"textarea"}],
                              [{"title":"手机号码","required":true,"field":"phone","type":"phone"},
                               {"dataKey":"应聘方向","data":[],"title":"应聘方向","required":true,"field":"ypfx","type":"selectList"}],
                              [{"dataKey":"是否","data":[],"title":"应聘方向是否服从分配","required":true,"field":"sffc","type":"select"},
                               {"title":"应聘其他要求","field":"other"}],
                              [{"title":"自我评价","field":"selfpj","type":"textarea"},
                               {"dataKey":"招聘信息来源","data":[],"title":"招聘信息来源","field":"source","type":"selectList"}]]);
            const searchFormFields = ref({"name":"","address":"","sex":"","xuel":""});
            const searchFormOptions = ref([[{"title":"姓名","field":"name"},{"title":"地址","field":"address"}],[{"dataKey":"sex","data":[],"title":"性别","field":"sex"},{"title":"学历","field":"xuel"}]]);
            const columns = ref([{field:'reshi_id',title:'reshi_id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'name',title:'姓名',type:'string',width:220,require:true,align:'left',sort:true},
                       {field:'address',title:'地址',type:'string',width:220,require:true,align:'left'},
                       {field:'sex',title:'性别',type:'string',bind:{ key:'sex',data:[]},width:220,require:true,align:'left'},
                       {field:'xuel',title:'学历',type:'string',width:110,require:true,align:'left'},
                       {field:'xuex',title:'学校',type:'string',width:220,require:true,align:'left'},
                       {field:'zuany',title:'专业',type:'string',width:220,require:true,align:'left'},
                       {field:'engdj',title:'英语等级',type:'string',width:220,require:true,align:'left'},
                       {field:'gkqk',title:'挂科情况',type:'string',width:220,require:true,align:'left'},
                       {field:'phone',title:'手机号码',type:'string',width:220,require:true,align:'left'},
                       {field:'ypfx',title:'应聘方向',type:'string',bind:{ key:'应聘方向',data:[]},width:220,require:true,align:'left'},
                       {field:'sffc',title:'应聘方向是否服从分配',type:'string',bind:{ key:'是否',data:[]},width:220,require:true,align:'left'},
                       {field:'other',title:'应聘其他要求',type:'string',width:220,align:'left'},
                       {field:'selfpj',title:'自我评价',type:'string',width:220,align:'left'},
                       {field:'source',title:'招聘信息来源',type:'string',bind:{ key:'招聘信息来源',data:[]},width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
